function foo(): unknown {
    throw "longmo";
}

function bar(): unknown {
    throw 123;
}

// unknown类型只能赋值给any和unknown类型
// any 类型可以赋值给任意类型
// 即不能将不确定的类型（unknown类型）赋值给确定的类型

let flag = true;

let result: unknown;

if (flag) {
    result = foo();
} else {
    result = bar();
}

let msg: string = result;
let num: number = result;

export {};
